package com.ae;

import com.ae.geese.Goose;
import com.ae.geese.GooseAdaptor;

public class DuckSimulator {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		DuckSimulator simulator = new DuckSimulator(); 
		simulator.simulate(); 

	}

	private void simulate() {
		Quackable mallardDuck = new MallardDuck(); 
		Quackable redheadDuck = new RedheadDuck(); 
		Quackable duckCall = new DuckCall(); 
		Quackable rubberDuck = new RubberDuck(); 
		
		// ** Added
		Quackable gooseDuck = new GooseAdaptor(new Goose() ) ;
		
		System.out.println("=============================");
		System.out.println(" Duck simulator is simulated ");
		System.out.println("=============================\n\n");
		
		simulate(mallardDuck);
		simulate(redheadDuck);
		simulate(duckCall);
		simulate(rubberDuck);			
		// ** Added
		simulate(gooseDuck);
	}
	
	void simulate(Quackable duck) {
		duck.quack();
	}

}
